home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Varios Español
/
Varios Español.iso
/
PCT10
/
PCTW$_05.ZIP
/
NOTESAMP.SC_
/
NOTESAMP.SC
Wrap
Text File
|
1993-09-11
|
7KB
|
301 lines
;;;;;;;;;;
;; Demo del Bloc de notas - NOTESAMP.SCT
;; Versi≤n 1.0
;;
;; Copyright 1993 Central Point Software, Inc.
;;
;;Prop≤sito:
;; Demostrar el uso de la aplicaci≤n Bloc de notas de ScriptTools
;;
;;Comandos usados:
;; FileExists(
;; GetEnvironment$(
;; MessageBox(
;; TopInstance(
;; Attach
;; EditText
;; Exec
;; Exit
;; If
;; Keyboard
;; MenuSelect
;; Mouse
;; MouseClick
;; MouseMove
;; Pause
;; Type
;;
;;;;;;;;;;
;;TΘrminos internacionales usados en el script.
Notepad_Name$="NOTEPAD_Bloc de notas"
Notepad_SaveAs$="NOTEPAD_Guardar como"
Notepad_PageSetup$="NOTEPAD_Preparar pßgina"
Notepad_PrintSetup$="NOTEPAD_Configuraci≤n de impresi≤n"
Notepad_Open$="NOTEPAD_Abrir"
Notepad_Find$="NOTEPAD_Buscar"
Notepad_About$="NOTEPAD_Acerca de Bloc de notas"
Ctrl$="{Ctrl}"
Home$="{Inicio}"
Up$="{Arriba}"
Return$="{Intro}"
;;Fin de las series internacionales.
copy "c:\autoexec.bat" to "c:\temp.txt"
if FileExists("c:\temp.txt")=0 then
MessageBox("Error","El script no pudo copiar c:\autoexec.bat a c:\temp.txt, se sale ahora.",0)
Exit ;Se sale del script para evitar la creaci≤n de cuadros de dißlogo indeseados
endif
Exec "Notepad" ;Ejecuta NOTEPAD.EXE
NoteInst=TopInstance() ;Obtiene un nuevo n·mero de instancia para notepad.exe en caso de que otra copia se estΘ ejecutando
Mouse OFF ;Desactiva temporalmente la funci≤n de entrada del usuario
Keyboard OFF
Attach "NOTEPAD_Edit1",NoteInst
Type "Este script muestra c≤mo ScriptTools funciona con el Bloc de notas."+Return$
pause 2 seconds
Attach Notepad_Name$,NoteInst
;;
;; Abre un archivo nuevo
;;
Wk_New = 9
; Elige "Wk_New" del men· Archivo
MenuSelect Wk_New
pause 2 sec
Attach Notepad_Name$,NoteInst
Wk_No = 7
Button Wk_No SingleClick
pause 2 sec
Attach "NOTEPAD_Edit1",NoteInst
Type "Este es un archivo nuevo."+Return$
pause 2 seconds
Attach Notepad_Name$,NoteInst
Wk_New = 9
MenuSelect Wk_New
pause 2 sec
Attach Notepad_Name$,NoteInst
Wk_No = 7
Button Wk_No SingleClick
pause 2 sec
Attach Notepad_Name$, NoteTest
Wk_Exit = 28
MenuSelect Wk_Exit
Exec "Notepad c:\temp.txt";Ejecuta NOTEPAD.EXE y abre temp.txt
NoteInst=TopInstance() ;Obtiene un nuevo n·mero de instancia para notepad.exe en caso de que otra copia se estΘ ejecutando
Attach "NOTEPAD_Edit1",NoteInst
Type Return$
Type Up$+"Este es un archivo antiguo."+Return$
Pause 2 Seconds
Type Return$
Attach Notepad_Name$,NoteInst
;;
;; Usa la funci≤n Guardar como
;;
Wk_SaveAs = 2
; Elige "Wk_SaveAs" del men·
MenuSelect Wk_SaveAs
Attach Notepad_SaveAs$,NoteInst
Wk_1152 = 1152
Pause 2 Seconds
Wk_Cancel = 2
Button Wk_Cancel SingleClick
Attach "NOTEPAD_Edit1",NoteInst
Type "Acaba de ver la funci≤n Guardar com≤."+Return$
Pause 2 seconds
Type Return$
Attach Notepad_Name$,NoteInst
;;
;; Abre el men· Preparar pßgina
;;
Wk_PageSetup = 32
; Elige "Wk_PageSetup" del men·
MenuSelect Wk_PageSetup
Attach Notepad_PageSetup$,NoteInst
Wk_f = 30
EditText Wk_f "&f"
pause 2 seconds
Wk_OK = 1
Button Wk_OK SingleClick
Attach "NOTEPAD_Edit1",NoteInst
Type "Acaba de ver la funci≤n Preparar pßgina."+Return$
Pause 2 seconds
Attach Notepad_Name$,NoteInst
;;
;; Elige el men· Instalar impresora
;;
Wk_PrintSetup = 31
; Elige "Wk_PrintSetup" del men·
MenuSelect Wk_PrintSetup
Attach Notepad_PrintSetup$,NoteInst
pause 2
Wk_Cancel = 2
Button Wk_Cancel SingleClick
Attach "NOTEPAD_Edit1",NoteInst
Type Return$
Type "Acaba de ver la funci≤n Instalar impresora."+Return$
Pause 5 seconds
Attach Notepad_Name$,NoteInst
Wk_Exit = 28
; Elige "Wk_Exit" del men·
MenuSelect Wk_Exit
Attach Notepad_Name$,NoteInst
Wk_No = 7
Button Wk_No SingleClick
exec "notepad"
NoteInst=TopInstance();Obtiene un nuevo n·mero de instancia para notepad.exe
Attach Notepad_Name$, NoteInst
Wk_Open = 10
; Elige "Wk_Open" del men·
MenuSelect Wk_Open
Attach Notepad_Open$, NoteInst
EditText 1152 "c:\temp.txt"
Wk_OK = 1
Button Wk_OK SingleClick
;;
;; Ejemplo de Cortar y Pegar
;;
Attach "NOTEPAD_Edit1", NoteInst
MouseClick Left Button Down At 0, 8
MouseMove 23 69
MouseMove 55 109
MouseMove 103 133
MouseMove 159 138
MouseMove 235 147
MouseMove 301 152
MouseMove 371 154
MouseMove 375 153
MouseMove 391 152
MouseMove 405 144
MouseMove 423 134
MouseMove 426 132
MouseMove 427 131
MouseMove 427 130
MouseMove 427 129
MouseMove 428 129
MouseMove 427 129
MouseMove 427 130
MouseClick Left Button Up At 427, 130
Attach Notepad_Name$, NoteInst
Wk_CopyCtrlC = 769
MenuSelect Wk_CopyCtrlC
Attach "NOTEPAD_Edit1", NoteInst
Type Return$
Type Return$
Attach Notepad_Name$, NoteInst
Wk_PasteCtrlV = 770
; Elige "Wk_PasteCtrlV" del men·
MenuSelect Wk_PasteCtrlV
Attach "NOTEPAD_Edit1", NoteInst
Type Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Up$+Return$
Type "Acaba de ver las funciones Copiar y Pegar."+Return$
pause 2 seconds
Attach Notepad_Name$, NoteInst
;;
;; Funci≤n Buscar
;;
Wk_Find = 3
; Elige "Wk_Find" del men·
MenuSelect Wk_Find
Pause 2
Attach Notepad_Find$, NoteInst
Wk_document = 1152
EditText Wk_document "c:\"
Pause 1
Wk_FindNext = 1
Button Wk_FindNext SingleClick
Pause 1
Wk_Cancel = 2
Button Wk_Cancel SingleClick
Attach "NOTEPAD_Edit1", NoteInst
Attach Notepad_Name$, NoteInst
Wk_FindNextF3 = 8
; Elige "Wk_FindNextF3" del men·
MenuSelect Wk_FindNextF3
Attach "NOTEPAD_Edit1", NoteInst
Type "{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}{F3}"
Attach Notepad_Name$, NoteInst
Wk_OK = 2
Button Wk_OK SingleClick
Attach "NOTEPAD_Edit1", NoteInst
type Ctrl$+Home$+"Acaba de ver la funci≤n Buscar."+Return$
Pause 2
Attach Notepad_Name$, NoteInst
;;
;; Abre el men· Acerca de
;;
Wk_AboutNotepad = 11
; Elige "Wk_AboutNotepad" del men·
MenuSelect Wk_AboutNotepad
Pause 2 seconds
Attach Notepad_About$, NoteInst
Wk_OK = 1
Button Wk_OK SingleClick
Attach "NOTEPAD_Edit1", NoteInst
Type "Acaba de ver el cuadro de dißlogo titulado Acerca de Bloc de notas."+Return$+Return$
Pause 2
Type "Ojalß haya disfrutado la demostraci≤n. "+Return$+Return$+"Hasta pronto."
;;
;; Sale del Bloc de notas, luego termina el script
;;
Attach Notepad_Name$, NoteTest
Wk_Exit = 28
; Select "Wk_Exit" from the Menu
MenuSelect Wk_Exit
Attach Notepad_Name$, NoteTest
Wk_No = 7
Button Wk_No SingleClick
Mouse ON
Keyboard ON
delete "c:\temp.txt"